package TestyOtros;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.EventQueue;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JButton;
import javax.swing.JLabel;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

import javax.swing.SwingConstants;

import Beat.BeatController;
import Beat.BeatModel;
import Beat.BeatModelInterface;
import HeartModel.HeartController;
import HeartModel.HeartControllerSingleton;
import HeartModel.HeartModel;
import HeartModel.HeartModelSingleton;
import MusicModel.MusicController;
import MusicModel.MusicModel;
import Principal.ControllerInterface;
import Principal.TransparentPanel;

//import TransparentPanel;

public class MainVoff {

	private JFrame frame;

	/** COMPARAR CON CLASE MAIN Y VER PORQUE NO ANDA ESTA!!!!!!!
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					MainVoff window = new MainVoff();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public MainVoff() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frame = new JFrame();
		frame.setBounds(300, 200, 450, 300);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(null);
		frame.setTitle("Sistema TestDrive");
		//---------Imagen de Fondo--------------------------
				/*Fondo imagenfondo = new Fondo();
				frame.add(imagenfondo, BorderLayout.CENTER);
				frame.pack();*/
				TransparentPanel panel = new TransparentPanel();
				panel.setBackgroundImage(new ImageIcon("D:\\fondo.jpg").getImage());
				Component contents = panel;
				frame.getContentPane().add(contents, BorderLayout.CENTER);
				
				
		JButton btnDjTestdrive = new JButton("DJ TestDrive");
		btnDjTestdrive.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
			     BeatModelInterface model = new BeatModel();
				 ControllerInterface controller = new BeatController(model);
			}
		});
		btnDjTestdrive.setBounds(122, 35, 194, 23);
		frame.getContentPane().add(btnDjTestdrive);
		
		JButton btnHeartTestdrive = new JButton("Heart TestDrive");
		btnHeartTestdrive.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
		    	HeartModel heartModel = new HeartModel();
		        ControllerInterface model = new HeartController(heartModel);
			}
		});
		btnHeartTestdrive.setBounds(122, 69, 194, 23);
		frame.getContentPane().add(btnHeartTestdrive);
		
		JButton btnNewButton = new JButton("Heart TestDrive Singleton");
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				ControllerInterface model = new HeartControllerSingleton(HeartModelSingleton.getInstance());
			}
		});
		btnNewButton.setBounds(122, 103, 194, 23);
		frame.getContentPane().add(btnNewButton);
		
		JButton btnNewButton_1 = new JButton("Music TestDrive");
		btnNewButton_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
		        BeatModelInterface model = new MusicModel();
				ControllerInterface controller = new MusicController(model);
			}
		});
		btnNewButton_1.setBounds(122, 137, 194, 23);
		frame.getContentPane().add(btnNewButton_1);
		
		/***************----------*/
		//Set window size
	    frame.setPreferredSize(new Dimension(700,525));
		 
	    // Display the window.
		frame.pack();
		frame.setLocationByPlatform(true);
		frame.setVisible(true);
		//--------------------------------------------------
	}

}
